import { Request as request } from '@/utils/request'
import { PageParam } from '@/config/common'

export const getUsers = (pageParams: PageParam, data: any) => {
  return request({
    url: '/sys-user/page-list',
    method: 'post',
    params: pageParams,
    data
  })
}

export const getUserInfo = (id: string) => {
  return request({
    url: `/sys-user/info/${id}`,
    method: 'get'
  })
}

export const saveUser = (data: any) => {
  return request({
    url: '/sys-user/save',
    method: 'post',
    data
  })
}

export const removeUser = (id: string) => {
  return request({
    url: `/sys-user/remove/${id}`,
    method: 'delete'
  })
}
